<template>
    <div id="app">
		<RouterView></RouterView>
	</div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import {ACTION_TOKEN_LOGIN} from '@/store/constants';
@Component({
    components: {
    },
    async mounted() {
        if (!!this.$store.state.app.loginToken) {
            await this.$store.dispatch(ACTION_TOKEN_LOGIN);
            if(!this.$store.state.app.isLogin){
                this.$router.push('/login');
            }
        }
    },
})
export default class App extends Vue {
}
</script>

<style lang="scss" scoped>
#app {
  font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
